set(LIB_NAME MyDeviceWriter)
set(LIB_VERSION 1.0)
set(SRC_FILES MyDeviceWriter.h MyDeviceWriter.cpp)

if (${SUPPORT_DYNAMIC_LIBRARY})
    add_library(${LIB_NAME} SHARED ${SRC_FILES})
    target_link_libraries(${LIB_NAME} ${MIDDLEWARE_LIB_NAME})
    set_target_properties(${LIB_NAME} PROPERTIES VERSION ${LIB_VERSION})
else ()
    add_library(${LIB_NAME} STATIC ${SRC_FILES})
endif ()

if (${SUPPORT_CUDA_GPUS})
    set_source_files_properties(${SRC_FILES} PROPERTIES LANGUAGE CUDA)
    set_target_properties(${LIB_NAME} PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
endif ()